package com.itheima.factory;

import com.itheima.dao.UserDao;
import com.itheima.dao.impl.UserDapImpl;
import org.springframework.beans.factory.FactoryBean;

public class UserDaoFactoryBean implements FactoryBean<UserDao> {
//代替原始实例工厂中创建对象的方法
    public UserDao getObject() throws Exception {

        return new UserDapImpl();
    }

    public Class<?> getObjectType() {
        return UserDao.class;
    }

    public boolean isSingleton() {
        return true;
    }
}
